/**
* Copyright (c) By zengqh.
*
* This program is just for fun or demo, in the hope that it  
* will be useful, you can redistribute it and/or modify freely.
*
* Time: 2012/07/11
* File: SceneManager.h
* Blog: http://www.cnblogs.com/zengqh/
**/

#ifndef SceneManager_h__
#define SceneManager_h__

#include "../Core/Core.h"
#include "../Core/Declare.h"

#include "SkyboxSceneNode.h"
#include "CameraSceneNode.h"
#include "LightSceneNode.h"

class SceneManager
{
public:
	SceneManager(RenderSystem* render_system);
	virtual ~SceneManager();

	virtual void clipScene();

	virtual void addSceneNode(SceneNode* scene_node);

	virtual void addSkyboxSceneNode(SkyboxSceneNode* skybox);

	virtual void addLightSceneNode(LightSceneNode* light_node);

	virtual void setActiveCamera(CameraSceneNode* camera_node);

	virtual CameraSceneNode* getActiveCameraNode() const;

	virtual RenderSystem* getRenderSystem() const;

	virtual void render();

protected:
	RenderSystem*							_render_system;
	typedef std::list<SceneNode*>			SceneNodeList;
	SceneNodeList							_scene_node_list;
	typedef std::list<SkyboxSceneNode*>		SkyboxSceneNodeList;
	SkyboxSceneNodeList						_skybox_scene_node_list;
	typedef std::list<LightSceneNode*>		LightSceneNodeList;
	LightSceneNodeList						_light_scene_node_list;
	CameraSceneNode*						_active_camera_scene_node;
	typedef std::list<LightData>			LightDataList;
	LightDataList							_light_data_list;
};	

#endif    /* SceneManager_h__ */